const dic = {
  material_type: [
    {
      label: '纸箱',
      value: '1'
    },
    {
      label: '纸袋',
      value: '2'
    },
    {
      label: '立方盒',
      value: '3'
    }
  ],
  classify_type: [
    {
      label: '核心供应商',
      value: '1'
    },
    {
      label: '重要供应商',
      value: '2'
    },
    {
      label: '普通供应商',
      value: '3'
    }
  ]
}
export const option = function () {
  return {
    border: true,
    stripe: true,
    addBtn: false,
    editBtn: false,
    viewBtn: false,
    printBtn: false,
    addRowBtn: true,
    align: 'center',
    selection: true,
    menu: false,
    tip: false,
    index: true,
    indexLabel: '序号',
    column: [
      {
        label: '供应商名称',
        prop: 'supplierName',
        maxlength: 50,
        cell: true,
        rules: [
          {
            required: true,
            message: '请输入供应商名称',
            trigger: 'blur'
          }
        ]
      },
      {
        label: '供应物料分类',
        prop: 'supplierMaterialCategory',
        type: 'select',
        dicData: dic.material_type,
        props: {
          label: 'label',
          value: 'value'
        },
        cell: true,
        rules: [
          {
            required: true,
            message: '请选择供应物料分类',
            trigger: 'change'
          }
        ]
      },
      {
        label: '品类定位',
        prop: 'categoryPosition',
        maxlength: 50,
        cell: true
      },
      {
        label: '供应商关系定位',
        prop: 'supplierRelationPosition',
        maxlength: 50,
        cell: true
      },
      {
        label: '上一次供应商分级',
        prop: 'lastSupplierClassify',
        maxlength: 50,
        cell: true
      },
      {
        label: '上一次供应商考核结果',
        prop: 'lastSupplierResult',
        maxlength: 50,
        cell: true
      },
      {
        label: '理论供应商分级',
        prop: 'theorySupplierClassify',
        maxlength: 50,
        cell: true
      },
      {
        label: '供应商分级',
        prop: 'supplierClassify',
        type: 'select',
        dicData: dic.classify_type,
        props: {
          label: 'label',
          value: 'value'
        },
        cell: true,
        rules: [{ required: true, message: '请选择供应商分级', trigger: 'change' }]
      }
    ]
  }
}
